package game.entity;

import game.helper.MovingLeft;
import game.shared.Constants;

public class Monster extends AbsSprite {

	public Monster(Monster monster){
		super(monster);
	}
	
	public Monster(int id , SpriteManager _SpriteManager, String imgPath, int idAnimation, float frameDuration, int num_rows, int num_clus) {
		super(id, _SpriteManager, imgPath,idAnimation,  frameDuration,  num_rows, num_clus);
	}
	
	public Monster(int id , SpriteManager _SpriteManager, String imgPath,int idAnimation, float frameDuration, int scrX, int scrY, int frameWidth, int frameHeight, int num_rows, int num_clus) {
		super(id, _SpriteManager, imgPath,idAnimation,  frameDuration,  scrX, scrY, frameWidth, frameHeight, num_rows, num_clus);
	}	
	
	public Monster(int id , SpriteManager _SpriteManager, String configueFilePath)
	{
		super(id, _SpriteManager, configueFilePath);
	}
	
	@Override
	public void update() {
		if(this.getX() > Constants.SCREEN_WIDTH - this.animations.get(this.curAnimationIndex).getDimension().x)
			if(this.getCurrentState() != Constants.SPRITE_RUN_LEFT)
				this.setMoving(new MovingLeft(this.getSpeed()));
		super.update();
	}	

	public Monster(AbsSprite monster)
	{
		super(monster);
	}
}
